<?
$repair_list=select_lines_all_items($table_Prefix."repair","","equipmentid = '".$detail['nid']."' order by repairdate desc,nid desc","");?>

<table class="layui-table">
    <colgroup>
        <col width="80">
        <col width="200">
        <col >
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>维修日期</th>
        <th>金额</th>
        <th>负责人</th>
        <th>归还日期</th>
        <th>状态</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <?php
    for ($i = 0; $i < count($repair_list); $i++) {
        ?>
        <tr>
            <td><?echo $i+1?></td>
            <td><?echo substr($repair_list[$i]['repairdate'],0,10)?></td>
            <td><?echo $repair_list[$i]['cost']?></td>

            <?$borrower=select_one_line_all_items($table_Prefix."employee","nid = '".$detail[$i]['borrower']."'");?>

            <td><?echo $borrower["name"]?></td>

            <td><?echo substr($repair_list[$i]['returndate'],0,10)?></td>
            <td><?if($repair_list[$i]['status']=="正常"){echo "维修完毕";}else{echo "维修中";}?></td>
            <td><?echo $repair_list[$i]['remark']?></td>
            <td>
                <?if($repair_list[$i]['status']=="维修"){?>
                    <a href="../repair/detail-edit.php?nav-itemed=equipment&equipmentid=<? echo $repair_list[$i]['equipmentid']?>&nid=<? echo $repair_list[$i]['nid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
                        <i class="layui-icon">&#xe642;</i>修改
                    </a>
                <?}?></td>

        </tr>
        <?;}?>
    </tbody>
</table>